<?php

namespace app\api\controller;

use app\BaseController;
use frame\lib\Db;

class Common extends Base
{
   
    public function file()
    {
        $id = @$_GET['id'];
        if (!$id) error('缺少参数ID', 201);
        $file = Db::name('file')->field('id , content ,create_time , update_time')->where(['id' => $id, 'uid' => $this->user_id])->find();
        if (!$file) error('文档不存在');
        success($file);
    }
}
